# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=gsl

pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=1.16
pkgrel=2
pkgdesc="The GNU Scientific Library (GSL) is a modern numerical library for C and C++ programmers (mingw-w64)"
arch=('any')
url="http://www.gnu.org/software/gsl/gsl.html"
license=("GPL")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config")
options=('staticlibs' 'strip')
source=("http://mirror.ibcp.fr/pub/gnu/gsl/gsl-$pkgver.tar.gz")
md5sums=('e49a664db13d81c968415cd53f62bc8b')

build() {
  cd "$srcdir/gsl-$pkgver"
  mkdir -p build-${MINGW_CHOST} && cd build-${MINGW_CHOST}
  ../configure \
    --prefix=${MINGW_PREFIX} \
    --build=${MINGW_CHOST} \
    --host=${MINGW_CHOST}
    make
}

package() {
  cd "${srcdir}/gsl-${pkgver}/build-${MINGW_CHOST}"
  make DESTDIR="$pkgdir" install
}
